#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
#include <string.h>
int main(void)
{
    char* pStr[10], str[10][21];
    int Count = 0, max;
    int Input(char* pstr[], char(*s)[21]);
    void Find_max(char* pstr[], int count, int* Max);
    Count = Input(pStr, str);
    Find_max(pStr, Count, &max);
    printf("max = %s", pStr[max]);

    return 0;
}
int Input(char* pstr[], char(*s)[21])
{
    int i = 0;
    while (1)
    {
        scanf("%s", s[i]);
        if (strcmp(s[i], "*****") != 0)
            pstr[i] = s[i];
        else
            break;
        getchar();
        i++;
    }
    return i;
}

void Find_max(char* pstr[], int count, int* Max)
{
    int i = 0, j = 0;
    char* p = pstr[0];
    *Max = 0;
    for (i = 1; i < count; i++)
    {
        if (strcmp(pstr[i], p) > 0)
        {
            p = pstr[i];
            *Max = i;
        }
    }
}